\label{index_md_doc_mainpage}%
\Hypertarget{index_md_doc_mainpage}%
 Welcome to Open\+Loong Dynamics Control Project\textquotesingle{}s documentation!

Open\+Loong Dynamics Control Project is an open-\/source project led by Humanoid Robot (Shanghai) Co., Ltd, Shanghai Humanoid Robot Manufacturing Innovation Center and Open\+Atom Foundation.

This project provides a MPC-\/\+WBC based control framework based on the \char`\"{}\+Azure\+Loong\char`\"{} robot model in Shanghai Humanoid Robotics Innovation Center, which runs on Mujoco and shows three examples including walking, jumping and blindly stepping over obstales. \href{http://aa.com}{\texttt{ Project Homepage}}\hypertarget{index_autotoc_md1}{}\doxysection{Attribute}\label{index_autotoc_md1}
{\bfseries{Easy to Deploy}}\+: This project provides a comprehensive solution for humanoid control. The code is self-\/contained so that users can easily configure their working environment and run without installing other dependencies to simplify the deploying process.

{\bfseries{Easy to Understand}}\+: The humanoid control framework structure adopts a hierarchical modular design, improving the maintainability and expandability of the system. The design draws clear boundaries for all the modules of the system in terms of logic and function, which provides a more friendly environment for secondary development and enables the developers to customize and expand the functions more easily.

{\bfseries{Easy to Develop}}\+: The code structure is simple, following the code design principle of module encapsulation for function, applying bus for data interaction between modules, reducing encapsulation redundancy, and helping to reduce code complexity; algorithm implementation adopts the simple logic of \char`\"{}read-\/calculate-\/write\char`\"{}, which improves the readability of the code.

\hypertarget{index_autotoc_md2}{}\doxysection{User Manual}\label{index_autotoc_md2}
\hypertarget{index_autotoc_md3}{}\doxysubsection{Setup the environment}\label{index_autotoc_md3}
\hypertarget{index_autotoc_md4}{}\doxysubsubsection{suggested platform}\label{index_autotoc_md4}

\begin{DoxyItemize}
\item operate sysem\+: Ubuntu 22.\+04.\+4 LTS
\item compile\+: GCC 11.\+4.\+0 
\end{DoxyItemize}\hypertarget{index_autotoc_md5}{}\doxysubsubsection{install dependencies}\label{index_autotoc_md5}
This repository simulates the \char`\"{}\+Azure\+Loong\char`\"{} humanoid robot. Some dependencies including mujoco, pinocchio, eigen, quill, GLFW, jsoncpp are already contained in the code, but the simulation still needs open\+GL, which can be installed by executing the following instruction\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{sudo apt install libglu1-\/mesa-\/dev freeglut3-\/dev}

\end{DoxyCode}
 \hypertarget{index_autotoc_md6}{}\doxysubsection{Code Fetch and Compilation}\label{index_autotoc_md6}
The code can be downloaded in gitee or you can clone the repository using git 
\begin{DoxyCode}{0}
\DoxyCodeLine{\# Clone}
\DoxyCodeLine{git clone https://gitee.com/panda\_23/openloong-\/dyn-\/control.git}
\DoxyCodeLine{}
\DoxyCodeLine{\# Build}
\DoxyCodeLine{cd openloong-\/dyn-\/control}
\DoxyCodeLine{mkdir build}
\DoxyCodeLine{cd build}
\DoxyCodeLine{cmake ..}
\DoxyCodeLine{make}
\DoxyCodeLine{}
\DoxyCodeLine{\# mujoco simulation}
\DoxyCodeLine{./Walk\_mpc\_wbc \#or ./Walk\_wbc or ./Jump\_mpc}

\end{DoxyCode}
\hypertarget{index_autotoc_md7}{}\doxysubsection{Code Description}\label{index_autotoc_md7}
\href{http://cc.com}{\texttt{ This}} is the API documentation for the code.\hypertarget{index_autotoc_md8}{}\doxysubsubsection{Abbreviations}\label{index_autotoc_md8}
\tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{2}{|X[-1]}|}
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ prefix/suffix   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ meaning    }\\\cline{1-2}
\endfirsthead
\hline
\endfoot
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ prefix/suffix   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ meaning    }\\\cline{1-2}
\endhead
{\itshape L}, {\itshape W}   &local frame, world frame    \\\cline{1-2}
{\itshape fe}   &foot end    \\\cline{1-2}
{\itshape L}, {\itshape l}, {\itshape R}, {\itshape r}   &left, right    \\\cline{1-2}
{\itshape swing,} {\itshape sw}   &swing leg    \\\cline{1-2}
{\itshape stance}, {\itshape st}   &stance leg    \\\cline{1-2}
{\itshape eul}, {\itshape rpy}   &angular position expressed by euler angle    \\\cline{1-2}
{\itshape omega}   &angular velocity    \\\cline{1-2}
{\itshape pos}   &linear position    \\\cline{1-2}
{\itshape vel}   &linear velocity    \\\cline{1-2}
{\itshape tor}, {\itshape tau}   &torque at joint    \\\cline{1-2}
{\itshape base}   &baselink    \\\cline{1-2}
{\itshape des}   &desired value    \\\cline{1-2}
{\itshape cur}   &current value    \\\cline{1-2}
{\itshape rot}   &rotation matrix   \\\cline{1-2}
\end{longtabu}
\hypertarget{index_autotoc_md9}{}\doxysubsection{Developer\textquotesingle{}s Guide}\label{index_autotoc_md9}
\hypertarget{index_autotoc_md10}{}\doxysubsubsection{key control parameters}\label{index_autotoc_md10}

\begin{DoxyItemize}
\item \mbox{\hyperlink{classMPC}{MPC}} parameters 
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{//MPC.h}}
\DoxyCodeLine{\textcolor{keywordtype}{void}    set\_weight(\textcolor{keywordtype}{double} u\_weight, Eigen::MatrixXd L\_diag, Eigen::MatrixXd K\_diag);}
\DoxyCodeLine{\textcolor{comment}{//*u\_weight* : the minimal weight of control input}}
\DoxyCodeLine{\textcolor{comment}{//*L\_diag* : the weight of error compared to desired values, following the order (eul, pos, omega, vel)}}
\DoxyCodeLine{\textcolor{comment}{//*K\_diag* : the weight of control input, following the order (fl, tl, fr, tr)}}

\end{DoxyCode}

\item WBC priority 
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{//WBC\_QP.cpp}}
\DoxyCodeLine{std::vector<std::string taskOrder;}
\DoxyCodeLine{taskOrder.emplace\_back(\textcolor{stringliteral}{"{}RedundantJoints"{}});}
\DoxyCodeLine{taskOrder.emplace\_back(\textcolor{stringliteral}{"{}static\_Contact"{}});}
\DoxyCodeLine{taskOrder.emplace\_back(\textcolor{stringliteral}{"{}Roll\_Pitch\_Yaw\_Pz"{}});}
\DoxyCodeLine{taskOrder.emplace\_back(\textcolor{stringliteral}{"{}PxPy"{}});}
\DoxyCodeLine{taskOrder.emplace\_back(\textcolor{stringliteral}{"{}SwingLeg"{}});}
\DoxyCodeLine{taskOrder.emplace\_back(\textcolor{stringliteral}{"{}HandTrack"{}});}
\DoxyCodeLine{\textcolor{comment}{// add task or adjust the priority here}}

\end{DoxyCode}

\item WBC weight 
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{//PriorityTasks.h}}
\DoxyCodeLine{Eigen::MatrixXd Kp;                \textcolor{comment}{//weight of position error}}
\DoxyCodeLine{Eigen::MatrixXd Kd;                \textcolor{comment}{//weight of velocity eror}}
\DoxyCodeLine{\textcolor{comment}{//WBC\_QP.h}}
\DoxyCodeLine{Eigen::MatrixXd Q1;                \textcolor{comment}{//weight of the contact force error compared to desired, following the order (fl, tl, fr, tr)}}
\DoxyCodeLine{Eigen::MatrixXd Q2;                \textcolor{comment}{//weight of the acceleration tracking error}}

\end{DoxyCode}

\item Swing leg trajectory 
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{//FootPlacement.h}}
\DoxyCodeLine{\textcolor{keywordtype}{double} kp\_vx;                                 \textcolor{comment}{//x-\/direction footplacement parameter}}
\DoxyCodeLine{\textcolor{keywordtype}{double} kp\_vy;                                 \textcolor{comment}{//y-\/direction footplacement parameter}}
\DoxyCodeLine{\textcolor{keywordtype}{double} kp\_wz;                                 \textcolor{comment}{//z-\/direction posture parameter}}
\DoxyCodeLine{\textcolor{keywordtype}{double} stepHeight;                            \textcolor{comment}{//the maximal step height}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{//FootPlacement.cpp}}
\DoxyCodeLine{\textcolor{keywordtype}{double}    FootPlacement::Trajectory(\textcolor{keywordtype}{double} phase, \textcolor{keywordtype}{double} des1, \textcolor{keywordtype}{double} des2);        \textcolor{comment}{//z-\/direction posture trajectory}}
\DoxyCodeLine{\textcolor{comment}{//phase：the phase when reaching the highest}}
\DoxyCodeLine{\textcolor{comment}{//des1：the highest position along the trajectory}}
\DoxyCodeLine{\textcolor{comment}{//des2：the final position of the trajectory}}

\end{DoxyCode}

\item Gait control 
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{//GaitScheduler.h}}
\DoxyCodeLine{\textcolor{keywordtype}{double} tSwing;                                         \textcolor{comment}{//the time of one step}}
\DoxyCodeLine{\textcolor{keywordtype}{double} FzThrehold;                                     \textcolor{comment}{//the maximal force when touching the ground}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{//GaitScheduler.cpp}}
\DoxyCodeLine{DataBus::LegState legState=DataBus::RSt;                \textcolor{comment}{//the first step state}}

\end{DoxyCode}

\item Joint parameter 
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{//JointCtrConfig.json}}
\DoxyCodeLine{   \textcolor{stringliteral}{"{}Joint-\/ankle-\/l-\/pitch"{}} : \{}
\DoxyCodeLine{      \textcolor{stringliteral}{"{}PVT\_LPF\_Fc"{}} : 20,}
\DoxyCodeLine{      \textcolor{stringliteral}{"{}kd"{}} : 5.0,}
\DoxyCodeLine{      \textcolor{stringliteral}{"{}kp"{}} : 50.0,}
\DoxyCodeLine{      \textcolor{stringliteral}{"{}maxPos"{}} : 0.61087,}
\DoxyCodeLine{      \textcolor{stringliteral}{"{}maxSpeed"{}} : 48.8,}
\DoxyCodeLine{      \textcolor{stringliteral}{"{}maxTorque"{}} : 58.5,}
\DoxyCodeLine{      \textcolor{stringliteral}{"{}minPos"{}} : -\/0.43644}
\DoxyCodeLine{   \}}

\end{DoxyCode}

\end{DoxyItemize}\hypertarget{index_autotoc_md11}{}\doxysubsubsection{Instructions to replace robot model}\label{index_autotoc_md11}
{\bfseries{1. model file}}

a. xml file preparation

prepare the urdf (.urdf) file and mesh file (.stl) of the robot for adding the mujoco compiling tags 
\begin{DoxyCode}{0}
\DoxyCodeLine{<\textcolor{keywordtype}{mujoco}>}
\DoxyCodeLine{<\textcolor{keywordtype}{compiler}}
\DoxyCodeLine{        \textcolor{keyword}{meshdir}=\textcolor{stringliteral}{"{}meshes/"{}}}
\DoxyCodeLine{        \textcolor{keyword}{balanceinertia}=\textcolor{stringliteral}{"{}true"{}}}
\DoxyCodeLine{        \textcolor{keyword}{discardvisual}=\textcolor{stringliteral}{"{}false"{}} />}
\DoxyCodeLine{</\textcolor{keywordtype}{mujoco}>}

\end{DoxyCode}


change the working directory to {\ttfamily mujoco-\/3.\+x.\+x/bin}, run the command\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{./simulate}

\end{DoxyCode}


drag the URDF file into the simulation interface, after the model displaying correctly save the XML file. You should note the path of the mesh files.

You can also reference the Mujoco \href{https://mujoco.readthedocs.io/en/stable/XMLreference.html}{\texttt{ documentation}} to set tags like {\ttfamily compiler}, {\ttfamily option} or {\ttfamily asset} to customize {\ttfamily body}, {\ttfamily actuator} and {\ttfamily sensor} etc.

\tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{2}{|X[-1]}|}
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ parent label   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ child label    }\\\cline{1-2}
\endfirsthead
\hline
\endfoot
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ parent label   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ child label    }\\\cline{1-2}
\endhead
{\itshape worldbody}   &define light, camera, floor and robot(inertial、joint、freejoint、geom、site、camera、light etc)    \\\cline{1-2}
{\itshape actuator}   &define actuators (motor、position、velocity etc)    \\\cline{1-2}
{\itshape sensor}   &define the sensors and adjust the sensors parameters like noises   \\\cline{1-2}
\end{longtabu}


b. replace the model

Take the \char`\"{}\+Azure\+Dragon robot\char`\"{} as an example\+: under {\itshape base\+\_\+link}, there are four tandem connections in parallel\+: the head {\itshape Link\+\_\+head\+\_\+}, the waist {\itshape Link\+\_\+waist\+\_\+}, the left arm {\itshape Link\+\_\+arm\+\_\+l\+\_\+}, and the right arm {\itshape Link\+\_\+arm\+\_\+r\+\_\+} branches. The left arm and right arm branches each have 7 degrees of freedom and the head branch has 2 degrees of freedom. The waist branch has 3 degrees of freedom including pitch {\itshape Link\+\_\+waist\+\_\+pitch}, roll {\itshape Link\+\_\+waist\+\_\+roll}, yaw {\itshape Link\+\_\+waist\+\_\+yaw}, etc., and the left leg and right leg branches are connected in parallel, and each leg is connected with three hip joints {\itshape Link\+\_\+hip} and one knee joint {\itshape Link\+\_\+knee\+\_\+} in turn, two ankle joints {\itshape Link\+\_\+ankle\+\_\+} and in total 6 degrees of freedom. This completes the configuration of all the 31 degrees of freedom.

You can reference this configuration and try to customize your configuration 
\begin{DoxyCode}{0}
\DoxyCodeLine{<\textcolor{keywordtype}{worldbody}>}
\DoxyCodeLine{    <\textcolor{keywordtype}{body} \textcolor{keyword}{name}=\textcolor{stringliteral}{"{}base\_link"{}} \textcolor{keyword}{pos}=\textcolor{stringliteral}{"{}x x x"{}}>}
\DoxyCodeLine{        <\textcolor{keywordtype}{freejoint} \textcolor{keyword}{name}=\textcolor{stringliteral}{"{}float\_base"{}} />}
\DoxyCodeLine{        <\textcolor{keywordtype}{body} \textcolor{keyword}{name}=\textcolor{stringliteral}{"{}body1"{}} \textcolor{keyword}{pos}=\textcolor{stringliteral}{"{}x x x"{}}>}
\DoxyCodeLine{            <\textcolor{keywordtype}{inertial} \textcolor{keyword}{pos}=\textcolor{stringliteral}{"{}x x x"{}} \textcolor{keyword}{quat}=\textcolor{stringliteral}{"{}x x x"{}} \textcolor{keyword}{mass}=\textcolor{stringliteral}{"{}x"{}} \textcolor{keyword}{diaginertia}=\textcolor{stringliteral}{"{}x x x"{}}/>}
\DoxyCodeLine{            <\textcolor{keywordtype}{joint} \textcolor{keyword}{name}=\textcolor{stringliteral}{"{}joint1"{}} \textcolor{keyword}{pos}=\textcolor{stringliteral}{"{}0 0 0"{}} \textcolor{keyword}{axis}=\textcolor{stringliteral}{"{}1 0 0"{}} \textcolor{keyword}{limited}=\textcolor{stringliteral}{"{}true"{}} \textcolor{keyword}{range}=\textcolor{stringliteral}{"{}x x"{}}/>}
\DoxyCodeLine{            <\textcolor{keywordtype}{geom} \textcolor{keyword}{type}=\textcolor{stringliteral}{"{}mesh"{}} \textcolor{keyword}{contype}=\textcolor{stringliteral}{"{}0"{}} \textcolor{keyword}{conaffinity}=\textcolor{stringliteral}{"{}0"{}} \textcolor{keyword}{group}=\textcolor{stringliteral}{"{}1"{}} \textcolor{keyword}{density}=\textcolor{stringliteral}{"{}0"{}} \textcolor{keyword}{rgba}=\textcolor{stringliteral}{"{}x x x 1"{}} \textcolor{keyword}{mesh}=\textcolor{stringliteral}{"{}body1"{}}/>}
\DoxyCodeLine{            <\textcolor{keywordtype}{geom} \textcolor{keyword}{type}=\textcolor{stringliteral}{"{}mesh"{}} \textcolor{keyword}{rgba}=\textcolor{stringliteral}{"{}x x x 1"{}} \textcolor{keyword}{mesh}=\textcolor{stringliteral}{"{}body1"{}}/>}
\DoxyCodeLine{            <\textcolor{keywordtype}{body} \textcolor{keyword}{name}=\textcolor{stringliteral}{"{}body2"{}} \textcolor{keyword}{pos}=\textcolor{stringliteral}{"{}x x x"{}}>}
\DoxyCodeLine{                ...}
\DoxyCodeLine{                <\textcolor{keywordtype}{joint} \textcolor{keyword}{name}=\textcolor{stringliteral}{"{}joint2"{}} .../>}
\DoxyCodeLine{                ...}
\DoxyCodeLine{            </\textcolor{keywordtype}{body}>}
\DoxyCodeLine{        </\textcolor{keywordtype}{body}>}
\DoxyCodeLine{        <\textcolor{keywordtype}{body} \textcolor{keyword}{name}=\textcolor{stringliteral}{"{}body3"{}} \textcolor{keyword}{pos}=\textcolor{stringliteral}{"{}x x x"{}}>}
\DoxyCodeLine{            ...}
\DoxyCodeLine{            <\textcolor{keywordtype}{joint} \textcolor{keyword}{name}=\textcolor{stringliteral}{"{}joint3"{}} .../>}
\DoxyCodeLine{            ...}
\DoxyCodeLine{        </\textcolor{keywordtype}{body}>}
\DoxyCodeLine{    </\textcolor{keywordtype}{body}>}
\DoxyCodeLine{</\textcolor{keywordtype}{worldbody}>}

\end{DoxyCode}


In this case, two branches are connected in parallel under {\itshape base\+\_\+link}, one branch consists of {\itshape body1} and {\itshape body2} in series, and the other branch consists of {\itshape body3}. If the robot has a floating base, add the free joint {\itshape freejoint} under {\itshape body} named {\itshape base\+\_\+link} above. If the robot is a fixed base, remove the {\itshape freejoint} . Optionally, {\itshape freejoint} can be masked out during the model configuration phase, if desired.

This project sets actuator for each of the 31 joints. 
\begin{DoxyCode}{0}
\DoxyCodeLine{<\textcolor{keywordtype}{actuator}>}
\DoxyCodeLine{    <\textcolor{keywordtype}{motor} \textcolor{keyword}{name}=\textcolor{stringliteral}{"{}motor1"{}}  \textcolor{keyword}{joint}=\textcolor{stringliteral}{"{}joint1"{}} \textcolor{keyword}{gear}=\textcolor{stringliteral}{"{}x"{}} \textcolor{keyword}{ctrllimited}=\textcolor{stringliteral}{"{}true"{}} \textcolor{keyword}{ctrlrange}=\textcolor{stringliteral}{"{}x x"{}}/>}
\DoxyCodeLine{    ...}
\DoxyCodeLine{</\textcolor{keywordtype}{actuator}>}

\end{DoxyCode}


The user can define the corresponding actuators at the active joints depending on the degrees of freedom of the robot.

The project is configured with sensors such as quaternion {\itshape framequat}, velocimeter {\itshape velocimeter}, angular velocimeter {\itshape gyro}, accelerometer {\itshape accelerometer}, which are mounted at the {\itshape site} already defined in the {\itshape body} tag, and can be added according to the needs of {\itshape touch}, {\itshape force}, {\itshape torque}, {\itshape jointpos}, {\itshape jointvel}, {\itshape actuatorfrc} and other sensors can be added as required. 
\begin{DoxyCode}{0}
\DoxyCodeLine{<\textcolor{keywordtype}{sensor}>}
\DoxyCodeLine{    <\textcolor{keywordtype}{framequat} \textcolor{keyword}{name}=\textcolor{stringliteral}{"{}xx"{}} \textcolor{keyword}{objtype}=\textcolor{stringliteral}{"{}site"{}} \textcolor{keyword}{objname}=\textcolor{stringliteral}{"{}imu"{}} />}
\DoxyCodeLine{    <\textcolor{keywordtype}{velocimeter} \textcolor{keyword}{name}=\textcolor{stringliteral}{"{}xx"{}} \textcolor{keyword}{site}=\textcolor{stringliteral}{"{}imu"{}} />}
\DoxyCodeLine{    <\textcolor{keywordtype}{gyro} \textcolor{keyword}{name}=\textcolor{stringliteral}{"{}xx"{}} \textcolor{keyword}{site}=\textcolor{stringliteral}{"{}imu"{}} />}
\DoxyCodeLine{    <\textcolor{keywordtype}{accelerometer} \textcolor{keyword}{name}=\textcolor{stringliteral}{"{}xx"{}} \textcolor{keyword}{site}=\textcolor{stringliteral}{"{}imu"{}} />}
\DoxyCodeLine{</\textcolor{keywordtype}{sensor}>}

\end{DoxyCode}
 In addition to the degree of freedom configuration, actuator configuration, sensor configuration, other more specific parameter modifications can refer to the Mojoco official \href{https://mujoco.readthedocs.io/en/stable/XMLreference.html}{\texttt{ documentation}}.

{\bfseries{2. Control code and Mujoco interface}}

Use fuction {\ttfamily mj\+\_\+load\+XML}、{\ttfamily mj\+\_\+make\+Data}to get {\ttfamily mj\+Model}、{\ttfamily mj\+Data} struct. You can reference the \href{https://mujoco.readthedocs.io/en/stable/XMLreference.html}{\texttt{ documentation}} for more details of {\ttfamily mj\+Model}、{\ttfamily mj\+Data}、{\ttfamily mj\+Option}. 
\begin{DoxyCode}{0}
\DoxyCodeLine{mjModel* mj\_model = mj\_loadXML(\textcolor{stringliteral}{"{}../Models/xxx.xml"{}}, 0, error, 1000);}
\DoxyCodeLine{mjData* mj\_data = mj\_makeData(mj\_model);}

\end{DoxyCode}


{\ttfamily mj\+\_\+model-\/$>$nv} is the dimension of generalized velocity coordinate, i.\+e. the linear velocity, angular velocity of the floating base, and the velocity of the 31 joints of the rotational type. The variables related to the degrees of freedom in the program framework of the project are corresponding to {\ttfamily mj\+\_\+model-\/$>$nv-\/6}, and the dynamics library will automatically get the dimensions of the degrees of freedom of the robot according to the URDF, where all the dimension information are defined. Thus users don\textquotesingle{}t have to modify it in the program manually.

As the access to the addresses of {\itshape body}, {\itshape joint}, {\itshape motor} and other components of this project relies on querying the name string and locking the address, when a component is modified, it will not affect the data reading and writing of other {\itshape body}, {\itshape joint}, and provide convenience for modifying the model compared to the direct indexing number. When modifying the control parameters of a certain degree of freedom in the model, you only need to modify the {\ttfamily Joint\+Name} of {\itshape MJ\+\_\+\+Interface.\+h}, the {\ttfamily motor\+Name} of {\itshape Pin\+\_\+\+Kin\+Dyn.\+h}, the {\ttfamily motor\+Name} of {\itshape PVT\+\_\+\+Ctr.\+h}, and the variables corresponding to the name of a certain degree of freedom in the {\itshape Joint\+Ctr\+Config.\+json} file. For example, to modify the stiffness of {\ttfamily J\+\_\+waist\+\_\+pitch}, you need to modify {\ttfamily J\+\_\+waist\+\_\+pitch} and the corresponding PD parameter in {\itshape Joint\+Ctr\+Config.\+json}, and the name of {\ttfamily J\+\_\+waist\+\_\+pitch} corresponds to the {\itshape joint name}, {\itshape motor name} in the xml file.

The sensor data address is also accessed by querying the name string to find the address, adding or deleting sensors can be done by modifying the corresponding sensor name in {\itshape MJ\+\_\+\+Interface.\+h}.\hypertarget{index_autotoc_md12}{}\doxysection{References}\label{index_autotoc_md12}
\mbox{[}1\mbox{]} D. Kim, J. D. Carlo, B. Katz, G. Bledt, S. Kim, Highly dynamic quadruped locomotion via whole-\/body impulse control and model predictive control. ar\+Xiv\+:1909.\+06586 (2019).

\mbox{[}2\mbox{]} Kim D, Jorgensen S J, Lee J, et al. Dynamic locomotion for passive-\/ankle biped robots and humanoids using whole-\/body locomotion control. ar\+Xiv\+:1901.\+08100 (2020).

\mbox{[}3\mbox{]} Di Carlo J, Wensing P M, Katz B, et al. Dynamic locomotion in the mit cheetah 3 through convex model-\/predictive control\mbox{[}C\mbox{]}//2018 IEEE/\+RSJ international conference on intelligent robots and systems (IROS). IEEE, 2018\+: 1-\/9.\hypertarget{index_autotoc_md13}{}\doxysection{Citation}\label{index_autotoc_md13}

\begin{DoxyCode}{0}
\DoxyCodeLine{@software\{Robot2024OpenLoong,}
\DoxyCodeLine{  author = \{Humanoid Robot (Shanghai) Co., Ltd\},}
\DoxyCodeLine{  title = \{\{OpenLoong-\/DynamicsControl: Motion control framework of humanoid robot based on \mbox{\hyperlink{classMPC}{MPC}} and WBC\}\},}
\DoxyCodeLine{  url = \{https:\textcolor{comment}{//gitee.com/panda\_23/openloong-\/dyn-\/control.git\},}}
\DoxyCodeLine{  year = \{2024\}}
\DoxyCodeLine{\}}

\end{DoxyCode}
 \hypertarget{index_autotoc_md14}{}\doxysection{Contact us}\label{index_autotoc_md14}
Developers are welcome to participate in the optimization and improvement of this code base!

You can comment on existing content, give feedback on issues, contribute your original content, etc. If you have any questions or suggerstions, please contact \href{mailto:web@openloong.org.cn}{\texttt{ web@openloong.\+org.\+cn}} 